perm filename A57.TEX[106,RWF] blob sn#872425 filedate 1989-04-21 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	\magnification\magstephalf
C00006 ENDMK
CāŠ—;
\magnification\magstephalf
\input macro.tex
\def\today{\ifcase\month\or
  January\or February\or March\or April\or May\or June\or
  July\or August\or September\or October\or November\or December\fi
  \space\number\day, \number\year}
\baselineskip 14pt
\rm
\line{\sevenrm a57.tex[106,phy] \today\hfill}

\bigskip
\noindent{\bf Output Format.}

In a Pascal {\tt WRITE} or {\tt WRITELN} command, 
each operand is normally printed in a
standard format for the type of value it has.  If the operand is an integer
variable, and the computer uses 36~bit words, the value of the variable is
printed as a decimal number of up to 11~digits, possibly preceded by a minus
sign.  Including a blank space to separate adjacent numbers, we use a
13-character field, with the first character always blank, and the value of the
number right-justified so that it is easy to print columns of numbers with the
units digits lined up vertically.

If you know, however, that the value of variable {\tt I}is
 positive, and no more than
(say) 4096, you may want to print it in regions of
four or five characters, to save  space.

This can be done by using {\tt I:4} or {\tt I:5}
as the operand of a {\tt WRITE} or {\tt WRITELN} command.
Any expression appearing as an operand may be followed by a colon and the desired
length of field.  Usually the length is a constant, but any expression with an
integer value will do.

If the value won't fit in a field of the specified size, Pascal embodies the
assumption that the user prefers to get full information at the expense of
consistent appearance; the field is expanded to fit the operand.  
This can be
useful when you want to print numbers in the context of natural language; the
command {\tt WRITE('there are', I:1 'airplanes approaching'.}) can result in
$$\hbox{\tt There are 2 airplanes approaching.}$$
or
$$\hbox{\tt There are 2000000 airplanes approaching.}$$



\bigskip
\parindent0pt
\copyright 1984 Robert W. Floyd

First draft March 28, 1984 

\bye